package itsm.isperp.module.controller.api.user;

import itsm.isperp.module.service.app.AppMessageSuccessService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 
 * 
 * 
 * @author lizx
 * @date 2014-5-29
 * @since 1.0
 * 
 */
@Controller
@RequestMapping("api/user/message")
public class MessageController {

	/**
	 * 系统用户管理服务
	 */
	@Autowired
	protected AppMessageSuccessService appMessageSuccessService;

	@RequestMapping("userMessagesCount")
	@ResponseBody
	public Integer userMessagesCount(String username) {
		
		return appMessageSuccessService.findMyMessageCount(username, false);
	}

}
